#region license
# This file is part of Grawlix.
# 
# Grawlix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
# 
# Grawlix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public
# License along with Grawlix.  If not, see
# <http://www.gnu.org/licenses/>.
#endregion

"""The actual sprite implementation."""

namespace Grawlix.Services.Rendering
import System

class SpriteState:
"""A loaded set of sprite data."""
	
	def constructor(
		[required] friendlyName as string,
		[required] animations as ISpriteAnimation*):
	"""
	Initializes a sprite object.
	Param friendlyName: A friendly name for the sprite.
	Param animations: The list of animations that comprise the sprite.
	"""
		_friendlyName = friendlyName
	
	def FindAnimation([required] name as string):
	"""
	Looks up an animation based upon its name.
	Param name: The name of the animation to look up.
	Returns: The animation if found, else a default animation object.
	"""
		return null
	
	def TryFindAnimation([required] name as string):
	"""
	Looks up an animation based upon its name.
	Param name: The name of the animation to look up.
	Returns: The animation if found, else null.
	"""
		return null
	
	override def ToString():
	"""
	Get a string representation for this object.
	Returns: A string representation for this object.
	"""
		return "Sprite ${_friendlyName}"
	
	[getter(FriendlyName)]
	private _friendlyName as string
	"""The friendly name of the sprite."""
	
	
	
	